package 原型模式.客户类;

import java.io.Serializable;

public class Address implements Cloneable, Serializable {
    private String country;//国家
    private String province;//省份
    private String city;//城市
    private String zipCode;//邮编

    public Address(){}
    public Address(String country, String province, String city, String zipCode) {
        this.country = country;
        this.province = province;
        this.city = city;
        this.zipCode = zipCode;
    }

    //浅拷贝
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }



    @Override
    public String toString() {
        return "Address{" +
                "country='" + country + '\'' +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", zipCode='" + zipCode + '\'' +
                '}';
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getZipCode() {
        return zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }
}
